package org.smile.homework01.kevin.Parking_handle;


import java.util.Scanner;

public class Application {

    public static void main(String[] args) {
        //1、生成停车场
        //1.生成停车场
        ParkingLot parkingLot = new ParkingLot(5);

        //time
//        Integer time = 0;

        //2.生成车

        //3.0运营停车场
        OUT:
        while (true) {
            //time
//            time++;

                Scanner in = new Scanner(System.in);
                System.out.println("请输入操作的选择：");
                int actionChoice = in.nextInt();
                if(actionChoice>0 && actionChoice <= 4){
                    switch(actionChoice){
                        case 1:Vehicle vehicle = new Vehicle();
                                vehicle.describe();
                                vehicle.enterParkingLot(parkingLot);//进入停车场
                            parkingLot.describe();
                            break;
                        case 2:parkingLot.runBusiness();   //离开停车场
                            parkingLot.describe();
                            break;
                        case 3:  parkingLot.describe();           //查询收入；
                            break;
                        case 4:break OUT;         //结束程序
                        default:
                            throw new IllegalStateException("Unexpected value: " + actionChoice);
                    }
                }


            //3.1给车提供服务
//            parkingLot.runBusiness(time);
//            parkingLot.describe();
        }



    }

}

